
function getcontent(){
	var array = document.getElementsByClassName("id");
	var value = "";
	for (var i=0; i < document.getElementsByClassName("eid").length; i++) {
		if(document.getElementsByClassName("eid")[i].checked){
			value = value + document.getElementsByClassName("eid")[i].value + ";";
		}
	}
	location.href="process?value="+value;
}

function startWebSocket() {
	if (!window.WebSocket) alert("WebSocket not supported by this browser!");
	// 创建WebSocket
	var ws = new WebSocket("ws://localhost:8080/websocket");
	// 收到消息时在消息框内显示
	ws.onmessage = function(evt) {   
		var s = evt.data;
		var obj = JSON.parse(s);
		document.getElementById(obj.id).innerHTML=obj.msg;
	};
	// 断开时会走这个方法
	ws.onclose = function() { 
	};
	// 连接上时走这个方法
	ws.onopen = function() {   
//		alert('open~~~~~~~~'); 
	};
}